<template>
  <div>
    <h3>{{ user.count }}</h3>
    <button @click="addCount">+++++++</button>
  </div>
</template>

<script>
// 声明响应式数据 reactive
// reactive 它只能声明对象类型的响应式数据
import { reactive } from 'vue'

export default {
  setup() {
    const user = reactive({
      count: 100
    })

    const addCount = () => {
      user.count++
    }

    return {
      user,
      addCount
    }
  }
}
</script>

<style lang="scss"></style>
